# -*- coding:utf-8 -*-
# -------------------------------------------------------------------------------
# Description:  
# Reference:
# Author: 安智军
# Date:   2021/12/17
# -------------------------------------------------------------------------------
import json
import requests


def sendDingDing(msg):
    print(msg)
    headers = {'Content-Type': 'application/json'}
    webhook = 'https://oapi.dingtalk.com/robot/send?access_token=6d991ad08573cbbdc71509bc81e33b173eed19ffe6149c5a64d85a735b7b1150'
    data = {
        "msgtype": "text",
        "text": {
            "content": msg + '\n'
        },
        "at": {
            "atMobiles": [
            ],
            "isAtAll": False
        }
    }

    requests.post(url=webhook, data=json.dumps(data), headers=headers)